<template>
	<el-card>
		<el-form :model="form" label-width="100px" style="max-width: 600px">
			<el-form-item label="用户昵称：">
				{{ form.nickname }}
			</el-form-item>
			<el-form-item label="用户姓名：">
				{{ form.name ? form.name : '未设置姓名' }}
			</el-form-item>
			<el-form-item label="用户电话：">
				{{ form.phone ? form.phone : '未设置电话' }}
			</el-form-item>
			<el-form-item label="反馈时间：">
				{{ form.create_time }}
			</el-form-item>
			<el-form-item label="反馈内容：">{{ form.feed_back }}</el-form-item>
			<el-form-item label="回复状态：">
				{{ form.dispose_state ? '已回复' : '未回复' }}
			</el-form-item>
			<el-form-item label="回复内容：" v-if="form.dispose_state">
				{{ form.returnContent }}
			</el-form-item>
			<el-form-item label="回复时间：" v-if="form.dispose_state">
				{{ form.returnTime }}
			</el-form-item>
			<el-form-item>
				<el-button type="primary" @click="router.back()">返回</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { getFeedbackDetails } from '@/utils/api';
const route = useRoute();
const router = useRouter();
const form: any = ref({});
const getPageData = () => {
	const id: any = route.params.id;
	getFeedbackDetails(id).then((res: any) => {
		console.log(res);
		form.value = res.data;
	});
};
getPageData();
</script>
